package cn.supermaster.management.web.controller.monitor;

import cn.supermaster.management.common.controller.BaseController;
import cn.supermaster.management.web.service.monitor.IMonitorOperateLogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

/**
 * 操作日志记录
 */
@Controller
@RequestMapping("/monitor/operlog")
public class MonitorOperateLogController extends BaseController {

    @Autowired
    private IMonitorOperateLogService monitorOperateLogService;

    @RequiresPermissions("monitor:operlog:view")
    @GetMapping
    public String skipOperateLogHtml() {
        return monitorOperateLogService.skipOperateLogHtml();
    }

    @RequiresPermissions("monitor:operlog:detail")
    @GetMapping("/detail/{operId}")
    public String skipOperateLogDetailHtml(@PathVariable("operId") Long operateLogId, ModelMap modelMap) {
        return monitorOperateLogService.skipOperateLogDetailHtml(modelMap, operateLogId);
    }
}
